| Filename | (eval 75)[/usr/share/perl5/CGI.pm:932] |
| Statements | Executed 23 statements in 1.18ms |
| Eval Invoked At | /usr/share/perl5/CGI.pm line 932 |
| Sibling evals | 1, 2, 3, 4, 5, 6 |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 2 | 2 | 2.64ms | 3.34ms | CGI::cookie |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # spent 3.34ms (2.64+692µs) within CGI::cookie which was called 2 times, avg 1.67ms/call:
# once (2.61ms+471µs) by C4::Auth::check_api_auth at line 895 of CGI.pm
# once (33µs+221µs) by C4::Auth::check_api_auth at line 1226 of C4/Auth.pm | ||||
| 2 | 2 | 7µs | 2 | 9µs | my($self,@p) = self_or_default(@_); # spent 9µs making 2 calls to CGI::self_or_default, avg 5µs/call |
| 3 | 2 | 10µs | 2 | 97µs | my($name,$value,$path,$domain,$secure,$expires,$httponly) = # spent 97µs making 2 calls to CGI::Util::rearrange, avg 48µs/call |
| 4 | rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES,HTTPONLY],@p); | ||||
| 5 | |||||
| 6 | 2 | 1.13ms | require CGI::Cookie; | ||
| 7 | |||||
| 8 | # if no value is supplied, then we retrieve the | ||||
| 9 | # value of the cookie, if any. For efficiency, we cache the parsed | ||||
| 10 | # cookies in our state variables. | ||||
| 11 | 2 | 800ns | unless ( defined($value) ) { | ||
| 12 | 1 | 4µs | 1 | 130µs | $self->{'.cookies'} = CGI::Cookie->fetch; # spent 130µs making 1 call to CGI::Cookie::fetch |
| 13 | |||||
| 14 | # If no name is supplied, then retrieve the names of all our cookies. | ||||
| 15 | 1 | 400ns | return () unless $self->{'.cookies'}; | ||
| 16 | 1 | 200ns | return keys %{$self->{'.cookies'}} unless $name; | ||
| 17 | 1 | 2µs | 1 | 54µs | return () unless $self->{'.cookies'}->{$name}; # spent 54µs making 1 call to CGI::Cookie::as_string |
| 18 | 1 | 4µs | 1 | 1µs | return $self->{'.cookies'}->{$name}->value if defined($name) && $name ne ''; # spent 1µs making 1 call to CGI::Cookie::value |
| 19 | } | ||||
| 20 | |||||
| 21 | # If we get here, we're creating a new cookie | ||||
| 22 | 1 | 800ns | return undef unless defined($name) && $name ne ''; # this is an error | ||
| 23 | |||||
| 24 | 1 | 200ns | my @param; | ||
| 25 | 1 | 1µs | push(@param,'-name'=>$name); | ||
| 26 | 1 | 900ns | push(@param,'-value'=>$value); | ||
| 27 | 1 | 300ns | push(@param,'-domain'=>$domain) if $domain; | ||
| 28 | 1 | 300ns | push(@param,'-path'=>$path) if $path; | ||
| 29 | 1 | 200ns | push(@param,'-expires'=>$expires) if $expires; | ||
| 30 | 1 | 100ns | push(@param,'-secure'=>$secure) if $secure; | ||
| 31 | 1 | 1µs | push(@param,'-httponly'=>$httponly) if $httponly; | ||
| 32 | |||||
| 33 | 1 | 12µs | 1 | 127µs | return CGI::Cookie->new(@param); # spent 127µs making 1 call to CGI::Cookie::new |
| 34 | } | ||||
| 35 | |||||
| 36 | ; |